-
Notifications
You must be signed in to change notification settings - Fork 543
Narrow string on *strlen() with positive-int #3407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Analyser/TypeSpecifier.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of comparison with ConstantIntegerType we now support IntegerRangeType
src/Analyser/TypeSpecifier.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we no longer do ConstantIntegerType related checks in specifyTypesForConstantBinaryExpression we can simplify this loop again to what it looked like a few weeks ago.
|
This pull request has been marked as ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this change weird ?
Shouldn't string & ~'' be considered as non-empty-string ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its the same thing, but just a difference how the type is printed
898d6c9 to
5296a87
Compare
|
Thank you! |
closes phpstan/phpstan#11558
separated from #3373